﻿using IntoNails.Infrastructure.InteractionRequests;
using IntoNails.Models;
using IntoNails.Modules.TicketManagement.InteractionRequests;
using IntoNails.Modules.TicketManagement.ViewModels;

namespace IntoNails.Modules.TicketManagement.Views
{
    /// <summary>
    /// Interaction logic for TicketInteractionDialogView.xaml
    /// </summary>
    public partial class TicketInteractionDialogView : ShowTicketInteractionDialogRequest, IGenericInteractionView<Ticket>
    {
        public TicketInteractionDialogView()
        {
            InitializeComponent();

            this.ViewModel = new TicketInteractionDialogViewModel();
            this.DataContext = this.ViewModel;
        }

        public TicketInteractionDialogViewModel ViewModel { get; private set; }

        public void SetEntity(Ticket entity)
        {
            this.ViewModel.SetEntity(entity);
        }

        public Ticket GetEntity()
        {
            return this.ViewModel.GetEntity();
        }
    }
}
